<html>
<head><meta charset="utf-8"><title>Debug info for PassWrapper.cpp · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html">Debug info for PassWrapper.cpp</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="231561684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231561684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231561684">(Mar 23 2021 at 23:54)</a>:</h4>
<p>Even if I compile LLVM with RelWithDebInfo I can't seem to get debug info from PassWrapper.cpp. I tried adding <code>.debug(true)</code> to the relevant build script but that didn't work either. Is there some switch I'm not using?</p>



<a name="231561782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231561782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231561782">(Mar 23 2021 at 23:55)</a>:</h4>
<p>It's also kind of annoying that even <code>-vv</code> doesn't print the compile lines from <a href="http://build.rs">build.rs</a> scripts</p>



<a name="231563384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231563384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231563384">(Mar 24 2021 at 00:12)</a>:</h4>
<p><code>CFLAGS</code> should be honoured by <code>cc</code>.</p>



<a name="231563415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231563415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231563415">(Mar 24 2021 at 00:12)</a>:</h4>
<p>I'm surprised <code>.debug(true)</code> did not work though.</p>



<a name="231565307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231565307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231565307">(Mar 24 2021 at 00:33)</a>:</h4>
<p>I wonder if the debug info is getting lost in LTO somewhere. It's ending up in <code>librustc_driver.dylib</code> which has no debug info.</p>



<a name="231565604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231565604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231565604">(Mar 24 2021 at 00:36)</a>:</h4>
<p>You can get the build script output if you dig around in the build directory, but it's probably a pain</p>



<a name="231566379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231566379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231566379">(Mar 24 2021 at 00:46)</a>:</h4>
<div class="codehilite"><pre><span></span><code>cat build/*/stage0-rustc/*/release/build/rustc_llvm-*/output
</code></pre></div>



<a name="231571540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231571540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231571540">(Mar 24 2021 at 02:01)</a>:</h4>
<p>OK, I had to run on dSYM generation for LLDB to pick up the symbols.</p>



<a name="231571555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231571555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231571555">(Mar 24 2021 at 02:01)</a>:</h4>
<p>This is a gotcha, I wonder if we should turn that on by default under some circumstances.</p>



<a name="231571610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Debug%20info%20for%20PassWrapper.cpp/near/231571610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Patrick Walton <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Debug.20info.20for.20PassWrapper.2Ecpp.html#231571610">(Mar 24 2021 at 02:02)</a>:</h4>
<p>The GitHub issue seems to imply that dSYM generation hurts debuggability, but it seems to be the opposite</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>